#include "wifi_config.h"

// 配置AP（热点）模式相关参数
const char *AP_SSID = "WLROBOT-TD";
const char *AP_PSW = "wlrobot123";

IPAddress AP_IP(192, 168, 1, 11);
IPAddress AP_GATEWAY(192, 168, 1, 11);
IPAddress AP_SUBNET(255, 255, 255, 0);


void WiFi_SetAP(void)
{
  WiFi.mode(WIFI_AP);
  WiFi.softAPConfig(AP_IP, AP_GATEWAY, AP_SUBNET);
  WiFi.softAP(AP_SSID, AP_PSW);
  
  // 启动 AP 并添加调试信息
  // if(WiFi.softAP(AP_SSID, AP_PSW)) {
  //   Serial.println("AP Created Successfully!");
  //   Serial.print("SSID: ");
  //   Serial.println(AP_SSID);
  //   Serial.print("IP Address: ");
  //   Serial.println(WiFi.softAPIP());
  //   Serial.print("MAC Address: ");
  //   Serial.println(WiFi.softAPmacAddress());
  // } else {
  //   Serial.println("AP Creation Failed!");
  // }
}

